import { Address } from '@renderer/types/type'
import { defineStore } from 'pinia'
import { AdInfo } from 'src/main/type'

export default defineStore('adStore', {
    state: () => ({
        adInfo: {} as AdInfo, // ip定位信息
        add: {} as Address, // 手动设置位置
    }),
    getters: {},
    actions: {
        setInfo(val: AdInfo) {
            this.adInfo = val
        },
        setAddress(val: Address) {
            this.add = val
        }
    },
    persist: true
})